<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:job="livcos.org/ns/process/job"
  xmlns:c="livcos.org/ns/cosmos"
  xmlns:u="livcos.org/ns/cosmos/update"
  exclude-result-prefixes="c">
  
  <xsl:param name="objId"/>
  <xsl:param name="response"/>
  
  <xsl:template match="/">
    <job:copy ref="/livcos.org/type/template/livcos.org/ns/doc/document" target="{$objId}"/>
    <job:feed stream="response" base="job" content-type="text/html">
      <html>
        <body>
          <p>Redirecting to <a href="{$response}"><xsl:value-of select="$response"/></a>...</p>
          <script type="text/javascript">
            <xsl:text>document.location.replace('</xsl:text>
            <xsl:value-of select="$response"/>
            <xsl:text>');</xsl:text>
          </script>
        </body>
      </html>
    </job:feed>
  </xsl:template>
  
</xsl:stylesheet>
